<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../themes/default/om-all.css">
<link rel="stylesheet" href="../common/css/demo.css">
<script src="../../jquery.js"></script>
<script src="../../ui/om-core.js"></script>
<script type="text/javascript" src="../../ui/om-menu.js"></script>
<title>使用远程JSON数据</title>
<!-- view_source_begin -->
<script type="text/javascript">
  $(document).ready(function(){
      $('#menu_ajax').omMenu({
          minWidth : 100,
          maxWidth : 150,
          dataSource : '../../omMenu.json'
      });

      $('#btn2').click(function(){
          $('#menu_ajax').omMenu('show',this);
      });
  });
</script>
<!-- view_source_end -->
</head>
<body>
<!-- view_source_begin -->
    <input type="button" id="btn2" value="ajax远程取数据">
    <div id="menu_ajax"></div>
  <!-- view_source_end -->
    <div id="view-desc">
        <p>设置dataSource属性为url，可以实现通过远程JSON数据来初始化menu菜单。
        </p>
    </div>
    <script type="text/javascript" src="../common/js/themeloader.js"></script>
</body>
</html>